﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "upload_file_manager.h"
class QPushButton;
class QLineEdit;
class QHBoxLayout;
class QVBoxLayout;
class QProgressBar;
class QNetworkReply;
class QNetworkAccessManager;
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void InitUI();
    void InitConnect();

public Q_SLOTS:

    void slotSelectFilePath();
    void slotSelectUploadFile();
    void slotUploadFinished(QNetworkReply::NetworkError status);
    void slotUploadProgress(int value);
   // void slotUploadProgress(qint64 bytesSent, qint64 bytesTotal);

private:
    QPushButton *selectFilePathButton;
    QPushButton *uploadButton;
    QLineEdit   *filePathEdit;
    QHBoxLayout *fileLayout;
    QVBoxLayout *mainLayout;
    QProgressBar *progressBar;
    UploadFileManager uploadFileManager;

};
#endif // MAINWINDOW_H
